package cc.lucien.demo01;

import java.util.Objects;

public class Student {
    private String name;

    public Student(String name){
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null)
            return false;
        if (this.getClass() != o.getClass())
            return false;
        Student stu = (Student) o;
        return stu.name.equalsIgnoreCase(this.name);
    }

    @Override
    public int hashCode() {
        int h = 0;
        h+= 31 * h + name.hashCode();
        return h;
    }
}
